{itemplate 'public/header'}
<style>
	.u-flyer{background-color: #ffcc00;}
	#page-app-goods header{background-color: #ffcc00;}
	#page-app-goods header a{color: #333;}
	#page-app-goods header .title{color: #333;}
	#page-app-goods header .title .icon{font-size: 0.6rem; margin-left: 0.2rem; position: relative; top: -0.1rem;}
	#page-app-goods .bg-warning{background-color: #ffcc00;}
	#page-app-goods .headline{position: absolute; top: 2.2rem; height: 2rem; padding: 0.5rem; font-size: 0.7rem; margin-left: 0; width: 100%; background-color: #fff;}
	#page-app-goods .headline .headline-image{height: 1rem}
	#page-app-goods .headline .headline-image img{width: 100%; padding-right: 0.5rem; height: 0.6rem; margin: 0.2rem 0;}
	#page-app-goods .headline .headline-list{padding-left: 0.5rem;}
	#page-app-goods .headline .headline-list .js-notice{height: 1rem; overflow: hidden}
	#page-app-goods .headline .headline-item{line-height: 1rem; height: 1rem;}
	#page-app-goods .headline .headline-item a{color: #333;}
	#page-app-goods .buttons-tab{top: 4.2rem;}
	#page-app-goods .buttons-tab .button.active{color: #333; border-color: #ffcc00; font-size: 0.8rem; font-weight: 600; border-bottom: 4px solid #ffcc00;}
	#page-app-goods .content{top: 6.2rem; margin-top: 1px;}
	#page-app-goods .parent-category-wrapper{overflow: hidden; padding: 0; position: relative; z-index: 10200; width: 25%; top: 6.2rem; margin-top: 1px;}
	#page-app-goods .parent-category-wrapper .parent-category li.active{font-weight: bold; background: #ffcc00; border-left: 0;}
	#page-app-goods .parent-category-wrapper .parent-category li.active a{color: #333;}
	#page-app-goods .category-container .children-category{padding-left: 25%;}
	#page-app-goods .category-container .children-category .heading span{border-color: #ffcc00;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .item-media{width: 45%;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .item-media img{width: 100%; height: 7rem; border-radius: 0.3rem;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .item-title{font-size: 0.8rem; color: #333; line-height: 1.3rem;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .sell-info{font-size: 0.7rem; color: #999; line-height: 1.3rem; margin-bottom: 0;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .tag-container{line-height: 1.3rem;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .tag-warning-fill{background-color: #ffcc00; border-color: #ffcc00; color: #fff; line-height: 1rem; font-size: 0.6rem; border-radius: 0;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .price{line-height: 1.3rem; color: #333;}
	#page-app-goods .category-container .children-category .children-category-wrapper .item-content .price .fee{font-weight: 500;}
	#page-app-goods .icon-plus,#page-app-goods .icon-minus{background-color: #ffcc00; border-color: #ffcc00; color: #fff;}
	#page-app-goods .category-container .children-category .select-spec{background-color: #ffcc00;}
	#page-app-goods .shop-cart-bar #cartNotEmpty .cart{background-color: #ffcc00;}
	.popup-goods-detail .goods-img .icon-close{right: 1rem; left: auto;}
	.popup-goods-detail .goods-img{height: 16rem; width: 100%;}
	.popup-goods-detail .goods-img img{height: 16rem; width: 100%;}
	.popup-goods-detail .swiper-container-horizontal>.swiper-pagination{bottom: 10px;}
	.popup-goods-detail .swiper-pagination .swiper-pagination-bullet-active{background: #ffcc00;}
	.popup-goods-detail .goods-name{padding: .5rem 1.5rem 0;}
	.popup-goods-detail .sell-info{padding: 0 1.5rem;}
	.popup-goods-detail .goods-num{padding: 0.7rem 1.5rem 0;}
	.popup-goods-detail .goods-num .price{color: #333;}
	.popup-goods-detail .goods-num .icon-plus,.popup-goods-detail .goods-num .icon-minus{background-color: #ffcc00; border-color: #ffcc00; color: #fff;}
	.popup-goods-detail .praise .rate{color: #ffcc00;}
	.popup-goods-detail .progress-bar{height: 0.4rem;}
	.popup-goods-detail .progress-bar .progress-active{background: #ffcc00;}
	.popup-goods-detail .goods-num .select-spec{background-color: #ffcc00;}
</style>
<script type='text/javascript' src='{WE7_WMALL_URL}static/js/components/light7/iscroll-probe.js' charset='utf-8'></script>
<div class="page store shopcategory" id="page-app-goods">
	<nav class="bar bar-tab no-gutter shop-cart-bar">
		<div class="" id="cartEmpty">
			<div class="left empty">
				<span class="cart">
					<span class="icon icon-cart"></span>
				</span>
				购物车是空的
			</div>
			<div class="right text-center bg-grey">{$store['send_price']}元起送</div>
		</div>
		<div class="hide" id="cartNotEmpty">
			<div class="left">
				<span class="cart">
					<span class="icon icon-cart"></span>
					<span class="badge bg-warning" id="cartNum">0</span>
				</span>
				共<span class="sum">￥<span id="totalPrice">0</span>元</span>
			</div>
			<div class="right text-center bg-grey" id="categoryCondition">还差￥0元起送</div>
			<div class="right text-center bg-grey">还差￥<span id="sendCondition">{$store['send_price']}</span>元起送</div>
			{if !$store['is_in_business_hours']}
				<div class="right text-center bg-grey hide" id="btnSubmit">休息中</div>
			{else}
				<div class="right text-center bg-warning hide" id="btnSubmit">选好了</div>
			{/if}
		</div>
	</nav>
	<header class="bar bar-nav">
		<a class="pull-left back" href="javascript:;"><i class="icon icon-arrow-left"></i></a>
		<h1 class="title open-popup" data-popup=".popup-privilege">{$store['title']}<span class="icon icon-triangledownfill"></span></h1>
		<a class="pull-right" href="javascript:;" style="margin-left: 5px"><i class="icon icon-search"></i></a>
		<a class="pull-right" href="javascript:;" id="btn-favorite" data-id="{$store['id']}" data-uid="{$_W['member']['uid']}"><i class="{if !empty($is_favorite)}icon icon-favorfill{else}icon icon-favor{/if}"></i></a>
	</header>
	{if !empty($notices)}
		<div class="headline row no-gutter border-1px-b">
			<div class="headline-image col-20 border-1px-r"><img src="{WE7_WMALL_TPL_URL}static/img/head_line.png" alt=""/></div>
			<div class="headline-list col-80">
				<div class="js-notice" data-speed="4">
					<ul>
						{loop $notices $notice}
							<li class="headline-item">
								{if !empty($notice['link'])}
									<a href="{$notice['link']}">{$notice['title']}</a>
								{else}
									<a href="{php echo imurl('wmall/home/notice', array('id' => $notice['id']))}">{$notice['title']}</a>
								{/if}
							</li>
						{/loop}
					</ul>
				</div>
			</div>
		</div>
	{/if}
	<div class="buttons-tab">
		<a href="{php echo imurl('wmall/store/goods', array('sid' => $store['id']));}" class="button active">商品</a>
		<a href="{php echo imurl('wmall/store/comment', array('sid' => $store['id']));}" class="button">评价</a>
		<a href="{php echo imurl('wmall/store/index', array('sid' => $store['id']));}" class="button">车主</a>
		<a href="http://wpa.qq.com/msgrd?v=3&uin={$store['sns']['qq']}&site=qq&menu=yes" class="button">客服</a>
	</div>
	<div class="parent-category-wrapper">
		<div class="parent-category">
			<div id="cateMenu">
				<ul class="category-list">
					{loop $categorys $category}
						{if !empty($cate_goods[$category['id']])}
							<li class="border-1px-b">
								<a href="javascript:;">{$category['title']}</a>
							</li>
						{/if}
					{/loop}
				</ul>
			</div>
		</div>
	</div>
	<div class="content lazyload-container">
		<div class="category-container row no-gutter" id="category-container">
			<div class="children-category col-100">
				<form class="border-1px-l" action="{php echo imurl('wmall/order/create/goods', array('sid' => $sid));}" method="post" id="goods-form">
					<input type="hidden" name="goods" value=""/>
					{loop $categorys $cate_row}
						{if !empty($cate_goods[$cate_row['id']])}
							<div class="children-category-wrapper">
								<div class="heading"><span>{$cate_row['title']}</span> {if $cate_row['min_fee'] > 0}<small>最低消费{$cate_row['min_fee']}元</small>{/if}</div>
								<ul class="list-block media-list">
									{loop $cate_goods[$cate_row['id']] $ds}
										<li id="goods-{$ds['id']}" {if $_GPC['goods_id'] == $ds['id']}class="active"{/if}>
											<a class="item-content goods-popup" data-id="{$ds['id']}" href="javascript:;">
												<div class="item-media">
													<img src="{WE7_WMALL_TPL_URL}static/img/hm.gif" class="lazyload" data-original="{php echo tomedia($ds['thumb']);}" alt=""/>
												</div>
												<div class="item-inner">
													<div class="item-title-row">
														<div class="item-title">{$ds['title']}</div>
													</div>
													<div class="item-text">
														<div class="sell-info">已售{$ds['sailed']}{$ds['unitname']}&nbsp;&nbsp; 好评{$ds['comment_good']}</div>
														<div class="tag-container">
															{if !empty($ds['discount'])}
																<span class="tag tag-warning-fill">{if $ds['poi_user_type'] == 'new'}新用户专享{/if} {$ds['discount']}折 每单仅限{$ds['max_buy_limit']}份</span>
															{/if}
														</div>
														<div class="price">
															<span class="fee">￥{$ds['discount_price']}</span>
															{if !empty($ds['bargain_id'])}
																<span class="original-fee">￥{$ds['price']}</span>
															{/if}
														</div>
													</div>
												</div>
											</a>
											{if $store['is_in_business_hours']}
												{if !$ds['is_options'] && !$ds['is_attrs']}
													{if !$ds['discount_available_total'] && !$ds['total']}
														<div class="goods-tips">已售完</div>
													{else}
														<div class="operate-num operate-goods">
															<span class="hide minus">
																<span class="icon icon-minus" data-goods-id="{$ds['id']}" data-option-id="0"></span>
																<span class="num">0</span>
															</span>
															<span class="icon icon-plus" data-goods-id="{$ds['id']}" data-option-id="0"></span>
														</div>
													{/if}
												{elseif $ds['is_options'] == 1 || $ds['is_attrs'] == 1}
														<div class="operate-goods">
															<span class="select-spec goods-option" data-id="{$ds['id']}">可选规格</span>
															<span class="badge hide">0</span>
														</div>
												{/if}
											{else}
												<div class="goods-tips">店铺休息中</div>
											{/if}
										</li>
									{/loop}
								</ul>
							</div>
						{/if}
					{/loop}
				</form>
			</div>
		</div>
	</div>
</div>
{itemplate 'store/goodsCommon'}
{itemplate 'public/footer'}